import MainContainerCustom from '@/components/MainContainerCustom';
import { toast } from '@vh-mobile/pro-utils';
import { CBlockCustom } from '@vh-mobile/pro-components';
import { View } from '@tarojs/components';

export default function DemoBlock() {
  const onTitleClick = () => {
    toast.success('点击成功');
  };
  return (
    <MainContainerCustom>
      <View style={{ background: '#fff', marginBottom: 10 }}>
        <CBlockCustom title="基础用法">1</CBlockCustom>
      </View>
      <View style={{ background: '#fff', marginBottom: 10 }}>
        <CBlockCustom title="设置列元素间距" padding>
          2
        </CBlockCustom>
      </View>

      <View style={{ background: '#fff', marginBottom: 10 }}>
        <CBlockCustom
          onTitleClick={onTitleClick}
          title="类目筛选"
          label="订阅类目好价"
          arrow="rigth"
          border={true}
          padding
        >
          点击事件，箭头，图标
        </CBlockCustom>
      </View>

      <View style={{ background: '#fff', marginBottom: 10 }}>
        <CBlockCustom
          className="ccc"
          title="类目筛选"
          arrow="rigth"
          label="label"
          tips="tips"
          padding
          prefix={true}
          card={true}
        >
          测试测试
        </CBlockCustom>
      </View>
    </MainContainerCustom>
  );
}
